#ifndef __MPU6050_DRV_H
#define __MPU6050_DRV_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

#define I2C_BASE(port)    ((port) == I2C_PORT_0 ? APB_I2C0 : APB_I2C1)

#define MPU_IIC_PORT    I2C_PORT_0
#define MPU_IIC_CLOCK   I2C_CLOCKFREQUENY_FASTMODE_PLUS
#define MPU_IIC_SCK     GIO_GPIO_22
#define MPU_IIC_DIO     GIO_GPIO_21
#define MPU_IIC_INT     GIO_GPIO_36
extern uint8_t mpu6050_iic_send_byte(uint8_t addr, uint8_t reg, uint8_t len, uint8_t *data);
extern uint8_t mpu6050_iic_receive_byte(uint8_t addr, uint8_t reg, uint8_t len, uint8_t *data);
extern void mpu6050_reg_int_cb(void *param);
extern void setup_mpu_io_init(void);
#ifdef __cplusplus
}
#endif

#endif